package hcn.protocol.ods.paymentXML;

import javax.xml.bind.annotation.*;
import java.io.Serializable;
import java.util.List;

/**
 * @Author:FangZhiyi
 * @Description 门诊预结算（XML）返参
 * @Data Created in 2020/11/5 14:05
 * @Moddified By:
 */
@XmlRootElement(name = "Data")
public class GetPrecalculatedFeeXMLResp  implements Serializable {
    /*付款金额*/
    private String PayAmount;
    /*发票号*/
    private String InvoiceCode;
    /*预结算标识*/
    private String PaymentBudgetNumber;
    //抵扣金额
    private String DeductionAmount;
    /*总金额*/
    private String TotalCost;
    /*总金额*/
    private String TotalFee;
    /*医保报销总额*/
    private String MedicalExpensesCost;
    /*结算明细说明*/
    private String ExtraFeeDesc;
    /*医保支付方式集合*/
    private List<MedicalInsuranceCost> MedicalInsuranceCosts;

    @XmlElement(name = "PayAmount")
    public String getPayAmount() {
        return PayAmount;
    }

    public void setPayAmount(String payAmount) {
        PayAmount = payAmount;
    }

    @XmlElement(name = "InvoiceCode")
    public String getInvoiceCode() {
        return InvoiceCode;
    }

    public void setInvoiceCode(String invoiceCode) {
        InvoiceCode = invoiceCode;
    }

    @XmlElement(name = "PaymentBudgetNumber")
    public String getPaymentBudgetNumber() {
        return PaymentBudgetNumber;
    }

    public void setPaymentBudgetNumber(String paymentBudgetNumber) {
        PaymentBudgetNumber = paymentBudgetNumber;
    }

    @XmlElement(name = "TotalCost")
    public String getTotalCost() {
        if(null != TotalCost){
            return TotalCost;
        }else {
            return TotalFee;
        }
    }

    public void setTotalCost(String totalCost) {
        TotalCost = totalCost;
    }

    @XmlElement(name = "TotalFee")
    public String getTotalFee() {
        return TotalFee;
    }

    public void setTotalFee(String totalFee) {
        TotalFee = totalFee;
    }

    @XmlElement(name = "MedicalExpensesCost")
    public String getMedicalExpensesCost() {
        return MedicalExpensesCost;
    }

    public void setMedicalExpensesCost(String medicalExpensesCost) {
        MedicalExpensesCost = medicalExpensesCost;
    }

    @XmlElement(name = "ExtraFeeDesc")
    public String getExtraFeeDesc() {
        return ExtraFeeDesc;
    }

    public void setExtraFeeDesc(String extraFeeDesc) {
        ExtraFeeDesc = extraFeeDesc;
    }

    @XmlElement(name = "DeductionAmount")
    public String getDeductionAmount() {
        return DeductionAmount;
    }

    public void setDeductionAmount(String deductionAmount) {
        DeductionAmount = deductionAmount;
    }

    @XmlElementWrapper(name = "MedicalInsuranceCosts")
    @XmlElement(name = "MedicalInsuranceCost")
    public List<MedicalInsuranceCost> getMedicalInsuranceCosts() {
        return MedicalInsuranceCosts;
    }

    public void setMedicalInsuranceCosts(List<MedicalInsuranceCost> medicalInsuranceCosts) {
        MedicalInsuranceCosts = medicalInsuranceCosts;
    }

    public static class MedicalInsuranceCost{
        /*医保支付方式*/
        private String MedicalCostPayTypeCode;
        /*医保支付金额*/
        private String MedicalInsuranceCost;

//        private List<CostItem> CostItemLists;

        @XmlElement(name = "MedicalCostPayTypeCode")
        public String getMedicalCostPayTypeCode() {
            return MedicalCostPayTypeCode;
        }

        public void setMedicalCostPayTypeCode(String medicalCostPayTypeCode) {
            MedicalCostPayTypeCode = medicalCostPayTypeCode;
        }

        @XmlElement(name = "MedicalInsuranceCost")
        public String getMedicalInsuranceCost() {
            return MedicalInsuranceCost;
        }

        public void setMedicalInsuranceCost(String medicalInsuranceCost) {
            MedicalInsuranceCost = medicalInsuranceCost;
        }

//        @XmlElementWrapper(name = "CostItemLists")
//        @XmlElement(name = "CostItemList")
//        public List<CostItem> getCostItemLists() {
//            return CostItemLists;
//        }
//
//        public void setCostItemLists(List<CostItem> costItemLists) {
//            CostItemLists = costItemLists;
//        }

        @XmlAccessorType(XmlAccessType.FIELD)
        public static class CostItem{
            /*费用归并代码*/
            private String mergingCode;
            /*费用归并名称*/
            private String CostItemName;
            /*归并小计*/
            private String CostItemCount;

            public String getMergingCode() {
                return mergingCode;
            }

            public void setMergingCode(String mergingCode) {
                this.mergingCode = mergingCode;
            }

            public String getCostItemName() {
                return CostItemName;
            }

            public void setCostItemName(String costItemName) {
                CostItemName = costItemName;
            }

            public String getCostItemCount() {
                return CostItemCount;
            }

            public void setCostItemCount(String costItemCount) {
                CostItemCount = costItemCount;
            }
        }
    }
}
